package com.os.ch2.prepost;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Matt
 * @Date 2022-01-10
 * @Desc: 配置类
 * @Version V1.0
 */
@Configuration
@ComponentScan("com.os.ch2.prepost")
public class PrePostConfig {

    @Bean(initMethod = "init", destroyMethod = "destory")  //指定方法，初始化之后，销毁之前执行的函数
    BeanWayService beanWayService(){
        return new BeanWayService();
    }

    @Bean
    JSR250WayService jsr250WayService(){
        return new JSR250WayService();
    }

}
